package DAL;
/**hofit**/
import java.util.ArrayList;

public class SysUser_DAL {
	
	private int userID;
	
	private String email;
	
	private String password;
	
	private int role;
	
	/**
	 * 
	 * @param arrSysUser
	 * convert array list to SysUser class
	 * constructor
	 */
	
	public SysUser_DAL (ArrayList<String> arrSysUser)
	{
		super();
		this.userID = Integer.parseInt(arrSysUser.get(0));
		this.email = arrSysUser.get(1);
		this.password = arrSysUser.get(2);
		this.role = Integer.parseInt(arrSysUser.get(3));
	}
	/**
	 * 
	 * @param userID
	 * @param email
	 * @param password
	 * @param role
	 * Constructor
	 */
	public  SysUser_DAL (int userID, String email, String password,int role)
	{
		super();
		this.userID = userID;
		this.email = email;
		this.password = password;
		this.role = role;
	}
	/**
	 * 
	 * @param sysUser
	 * @return SysUser_DAL
	 * convert SysUser class to array list
	 */
	public static ArrayList<String> sysUserToArray(SysUser_DAL sysUser)
	{
		ArrayList<String> arrAuthor = new ArrayList<String>();
		
		arrAuthor.add(Integer.toString(sysUser.userID));
		arrAuthor.add(sysUser.email);
		arrAuthor.add(sysUser.password);
		arrAuthor.add(Integer.toString(sysUser.role));
		
		return arrAuthor;
	}
	/**
	 * 
	 * @param value
	 * set User ID
	 */
	public void setUserID(int value) {
		this.userID = value;
	}
	/**
	 * 
	 * @return get User ID
	 */
	public int getUserID() {
		return userID;
	}
	/**
	 * 
	 * @param value
	 * set Email
	 */
	public void setEmail(String value) {
		this.email = value;
	}
	/**
	 * 
	 * @return get Email
	 */
	public String getEmail() {
		return email;
	}
	/**
	 * 
	 * @param value
	 * set Password
	 */
	public void setPassword(String value) {
		this.password = value;
	}
	/**
	 * 
	 * @return get Password
	 */
	public String getPassword() {
		return password;
	}
	/**
	 * 
	 * @param value
	 * set User Position
	 */
	public void setUserPosition(int value) {
		this.role = value;
	}
	/**
	 * 
	 * @return  get User Position
	 */
	public int getUserPosition() {
		return role;
	}
	

	
	
	


}
